#!/bin/bash
source /home/fanhongjie/fanhongjie/shell/clp/conf/CLP_Prop.conf
source ${WMatchCost_Conf}

source $COMMONS_DATEUTIL_FILE_PATH
backDay=1
fileName=""
echo `date`
if [ $# -ne 0 ];then
  backDay=$1
fi 
currDate=`getBackDay $backDay`
fileName="${WMatchClickCostLog_PATH}/${currDate}/${WMatchClickCostLog_File_Name}${currDate}"
awk -F "\t" -f ${WMatchClickCostLog_AWK_FILE} $fileName | sort -k 1n -k 3n | awk -F "\t" -f WMatchCostSum.awk > "${currDate}"
echo `date`
